import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'HELLO FLUTTER',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('TEXT WIDGET'),
        ),
        body: const Center(
          child: Text(
            'Text Widget 组件学习,作为学习flutter,这个组件是最基础最简单的，你必须掌握',
            // 文本对齐方式 left/center/right/start/end
            textAlign: TextAlign.left,
            // 最多显示几行
            maxLines: 1,
            // 文本溢出样式  clip/ellipsis/fade
            overflow: TextOverflow.ellipsis,
            // 文本样式
            style: TextStyle(
              fontSize: 20.0,
              // 字符间距
              letterSpacing: 5,
              fontWeight: FontWeight.w900,
              color: Colors.lightBlueAccent,
              //装饰线 overline/lineThrough/underline
              decoration: TextDecoration.underline,
              // 装饰线类型  solid/dashed/dotted
              decorationStyle:TextDecorationStyle.dotted,
              // 装饰线颜色
              decorationColor: Colors.red
            ),
          ),
        ),
      ),
    );
  }
}